﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="FilesDispatcherConfiguration"
    elementFormDefault="unqualified"
    attributeFormDefault="unqualified"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://BAFactory.net/schemas/TextLogProvider/"
    targetNamespace="http://BAFactory.net/schemas/TextLogProvider/"
>
  <xs:simpleType name="RotateOptions">
    <xs:restriction base="xs:string">
      <xs:enumeration value="OnTimeSpanInMinutes"/>
      <xs:enumeration value="OnSizeInBytes"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="LogLevels">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Error"/>
      <xs:enumeration value="Warning"/>
      <xs:enumeration value="Info"/>
      <xs:enumeration value="Debug"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:element name="Log">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Level" type="LogLevels" minOccurs="1" maxOccurs="1" />
        <xs:element name="FilePath" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="RotateOption" type="RotateOptions" minOccurs="1" maxOccurs="1" />
        <xs:element name="MaxFiles" type="xs:short" minOccurs="1" maxOccurs="1" />
        <xs:element name="MaxFiles" type="xs:short" minOccurs="1" maxOccurs="1" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
